package com.qf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.mapper.DtsUserAccountMapper;
import com.qf.pojo.DtsUserAccount;
import com.qf.service.DtsUserAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * projectName:workspace_6
 * author:hyn
 * time:2021/12/1 9:56
 * description:
 */
@Service
public class DtsUserAccountServiceImpl implements DtsUserAccountService {
    @Autowired
    private DtsUserAccountMapper userAccountMapper;
    @Override
    public DtsUserAccount findByUserId(Integer userId) {
        QueryWrapper<DtsUserAccount> wrapper = new QueryWrapper<>();
        wrapper.eq("user_id",userId);
        return userAccountMapper.selectOne(wrapper);
    }

    @Override
    public int saveSett(DtsUserAccount userAccount) {

        return userAccountMapper.updateByUserId(userAccount);


    }
}
